/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package etherblocks.game.entitysystem;

import com.jme3.math.Vector3f;
import etherblocks.game.entitysystem.components.*;

/**
 *
 * @author Carl
 */
public class EntityTemplate{
    
    public static void loadTemplate(Entity entity, String templateName){
        if(templateName.equals("cow")){
            entity.setComponent(new VisualComponent("cow"));
            entity.setComponent(new LocationComponent(new Vector3f(), System.currentTimeMillis()));
            entity.setComponent(new RotationComponent(new Vector3f(),  System.currentTimeMillis()));
            entity.setComponent(new PhysicsComponent(true));
            entity.setComponent(new CapsuleCollisionShapeComponent(2, 0));
        }
        else if(templateName.equals("player")){
            entity.setComponent(new VisualComponent("player"));
            entity.setComponent(new LocationComponent(new Vector3f(), System.currentTimeMillis()));
            entity.setComponent(new RotationComponent(new Vector3f(),  System.currentTimeMillis()));
            entity.setComponent(new PhysicsComponent(true));
            entity.setComponent(new CapsuleCollisionShapeComponent(0.66f, 2.5f));
            entity.setComponent(new BlockSetCollisionComponent());
        }
        else if(templateName.equals("zombie")){
            entity.setComponent(new VisualComponent("zombie"));
            entity.setComponent(new LocationComponent(new Vector3f(), System.currentTimeMillis()));
            entity.setComponent(new RotationComponent(new Vector3f(),  System.currentTimeMillis()));
            entity.setComponent(new PhysicsComponent(true));
            entity.setComponent(new CapsuleCollisionShapeComponent(0.66f, 2.5f));
        }
    }
}
